<template>
  <view>
    <view class="cu-list menu-avatar">
      <view class="cu-item" v-for="(item,index) in list" :key="index">
        <view class="cu-avatar round lg" :style="{'background-image':'url('+item.avatarurl+')'}"></view>
        <view class="content">
          <view class="text-grey">{{item.nickname}}</view>
          <view class="text-red">一个月积分变化:+{{item.creditRecord.change}}</view>
        </view>
        <view class="action">
          <view class="cu-tag round sm" :class="'bg-'+orange">{{index+1}}</view>
        </view>
      </view>
    </view>
  </view>
</template>

<script>
export default {
  data() {
    return {
      id: 0,
      list: []
    };
  },
  onLoad(option) {
    console.log("onload");
    console.log(option);
    this.id = option.id;
    this.request({
      url: this.apiServer + "/class/findClassUserMonthsCreditById?id=" + this.id
    }).then(res => {
      this.list = res.data;
    });
  },
  methods: {}
};
</script>

<style>
</style>
